Repository navigation
fix(ui): queryGroupHeaders hands on the server's hasMore, and a cut lane read draws no lane figure - #37277
Conversation
…ad draws no lane figure Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW Final green head for L1 and same-head contract review (2026-11-25T11:10Z):
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ Contract reviewServed-tier: Face: declaration ( ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS No must-fix, no should-fix. |
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — REWORK · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW Landing (2026-11-25T11:21Z): head
There is no narrowing arm, so no maintainer gate applies. State change: ready for review, and auto-merge armed; the merge queue lands it. On MERGED:
|
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW
Fixes #36870
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
@object-ui/types: new exported typeListViewGroupHeaderAnswer=ListViewGroupHeaderRow[] & { hasMore?: boolean };DataSource.queryGroupHeadersnow answers it.hasMore: truemeans the answer is partial (the door cut the groups). A source returning a plain array still satisfies the member, and a caller reading the answer as an array is unchanged.@object-ui/data-objectstack:queryGroupHeaderssetshasMore = trueon the returned rows array whenPOST /data/:object/queryanswershasMore: true(the grouped branch inprotocol-data-crud.tsslices to the default page size and answers it). A whole answer carries nohasMore.@object-ui/plugin-kanban: newreadLaneStatistic(answer, reading)answersnull(no figure for ANY lane) for a partial answer, elsereadLaneFigures.ObjectKanbanreads the lane read through it. Covers both residual cases of scope note 7124305685: the folded "Uncategorized" lane's partial figure, and "Sum 0" on a board of one query whose lane group was cut. ThelaneFigureOfcomment that said the flag is not handed on is corrected.useServerGrouping), the whole-set footer (useWholeSetSummary) andusedCurrencyCodesare untouched and read the same array.Clause-② measurement: after
@object-ui/typesbuild,dist/index.d.tscarries 1 hit anddist/data.d.ts3 hits ofListViewGroupHeaderAnswer;git grep -c ListViewGroupHeaderAnswer 9171bed0a -- ui/answers 0 hits (exit 1).dist/data.d.ts:956now types the member's return as a Promise ofListViewGroupHeaderAnswer. One new exported name plus an optional field on the return: widening. A tsc probe (--strict) shows a plainRow[]is assignable to the new answer type, so no implementer is narrowed. The claim carriedClause-②: no; this PR declares what was measured.Tests
Targeted pins (new)
ui/packages/data-objectstack/src/queryGroupHeaders-7189.test.ts, new describe: a door capped at a default page size of 2 over 5 groups givesrows.hasMore === true, rows still an array of the first 2; CONTROL page size 100:hasMoreundefined, all 5 rows.ui/packages/plugin-kanban/src/ObjectKanban.laneStatistic-36370.test.tsx, new top-level describea cut lane read draws no lane figure (objectstack#36870)(the shared harness file): a lane door that cuts topageSizerows and setshasMore.hasMoreis true and no[data-kanban-lane-statistic]is drawn anywhere, Uncategorized included;limit: 10), page size 1: no "Sum 0" on Won, no figure anywhere;Ablations (scripts/ablation-replace.mjs, mutation proven on disk, restored to HEAD)
readLaneStatistic: anchor 1 -> 0, blob b0d377196 -> 74ec141db; the two 36870 kanban pins went red (a lane statistic element was drawn where null was expected), CONTROL stayed green (2 failed, 1 passed). Restored: blob == HEAD,git diff HEADempty.answer.hasMore = trueline in the adapter: anchor 1 -> 0;sets hasMore on an answer capped by a small default page sizered, 5 others green. Restored: blob == HEAD,git diff HEADempty../KanbanLaneStatistic,./index), so nodist/is involved.Package suites and type-check (head 3696758)
vitest run packages/plugin-kanban/ packages/data-objectstack/ packages/types/under the verify lock: Test Files 604 passed (604), Tests 12516 passed (12516), VERDICT command-exit 0.queryGroupHeaders(40 files across plugin-grid, components, plugin-list, console): Test Files 40 passed (40), Tests 569 passed (569).pnpm --filter @object-ui/types --filter @object-ui/data-objectstack --filter @object-ui/plugin-kanban run type-check: exit 0.... --filter @object-ui/plugin-grid --filter @object-ui/components run type-check: exit 0. Declared narrowing: these two type-check runs ran outside the verify lock after three 540 s queue timeouts behind a 37-minute dogfood holder; tsc --noEmit writes nothing.Derived gates
dispatch-gates --commands: 40 commands; all 40 run with exit codes recorded;--ranreconciliation: 40 derived, 40 run, 0 NOT-MEASURED, 0 UNRUN.pnpm check:type-check-debtfirst answered exit 3 (lock queue timeout, never acquired), re-run exit 0.pnpm --dir ui exec vitest run scripts/: Test Files 172 passed, 2 skipped. Type-check lanes, the wide-population families and the full farm are CI's.Acceptance notes
useServerGrouping) andusedCurrencyCodesdo not read the new flag: if their grouped read is cut, a grid could list fewer groups than exist and the currency read could miss a code. Read from code only, not run, so no reach is measured here; carrier: Grouped grid and used-currency read ignore a truncated grouped answer: queryGroupHeaders' hasMore (#36870) is read only by the kanban lane statistic #37278 (Blocked-by 分组表头查询被分页截断时丢掉 hasMore:看板泳道合计可能显示「合计 0」或少算,且没有任何提示 #36870), filed at the seat's direction. Both callers keep working exactly as before, as the card asks.laneFigureOf'sholdsRecordsguard stays: over a whole answer it still catches a board count and an answer that disagree (a write between the two reads).Verification
Read first:
ui/packages/plugin-kanban/src/KanbanLaneStatistic.ts,readLaneStatistic: the one line that turns a partial answer into no figures.ui/packages/data-objectstack/src/index.ts,queryGroupHeaders: wherehasMoreis set on the rows array.ui/packages/types/src/data.ts,ListViewGroupHeaderAnswer: the published shape.Two-minute check:
cd ui && npx vitest run --root . packages/plugin-kanban/src/ObjectKanban.laneStatistic-36370.test.tsx -t 36870should show 3 passed.Generated by Claude Code